﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/Default.master" AutoEventWireup="true"
    CodeBehind="ServiceAdd.aspx.cs" Inherits="AUV5.Web.Pages.ServiceAdd" ClientIDMode="Static" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="/!js/service_add.js" type="text/javascript"></script>
    <style type="text/css">
        .uploadifyQueueItem
        {
            width: 155px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="lbMessage" class="popinfo errorinfor" runat="server" visible="false">
    </div>
    <div id="showError" class="popinfo errorinfor" style="display: none">
    </div>
    <p class="usertitle">
        发布
    </p>
    <asp:HiddenField ID="hfAspSessID" runat="server" />
    <asp:HiddenField ID="hfAuth" runat="server" />
    <div class="serviceaddbar">
        <p class="serviceaddtitle">
            <span class="imok">我可以</span> <span>
                <asp:TextBox ID="txtTitle" MaxLength="70" runat="server" />
            </span><span>类别</span> <span>
                <asp:DropDownList ID="ddlCategory" CssClass="selectl" runat="server">
                </asp:DropDownList>
            </span><span>只需要</span> <span class="nomar">
                <asp:DropDownList ID="ddlPrice" CssClass="selectj" runat="server">
                    <asp:ListItem Value="5" Text="5" />
                    <asp:ListItem Value="15" Text="15" />
                    <asp:ListItem Value="25" Text="25" />
                    <asp:ListItem Value="50" Text="50" />
                </asp:DropDownList>
            </span>
        </p>
        <p class="serviceaddinfo">
            <span class="txtserviceadd">详细</span> <span>
                <asp:TextBox ID="txtDescription" Rows="4" Columns="40" TextMode="MultiLine" runat="server"
                    MaxLength="500" CssClass="servicetextarea" />
            </span>
        </p>
        <div class="addupload">
            <p class="uploadimg" id="img">
                图片</p>
            <p class="icon_time" id="duration">
                时间</p>
            <p class="uploadvideo" id="video">
                视频</p>
            <p class="icon_inventory" id="stock">
                库存</p>
            <p class="icon_keyword" id="key">
                关键字</p>
            <p class="icon_postage" id="ship">
                交付方式</p>
        </div>
        <div class="requiredbar">
            <p>
                必填</p>
            <p>
                必填</p>
        </div>
        <%-- 上传图片--%>
        <div class="uploadimgbar uploadimgwid addimg hide">
            <p class="uploadicon">
                <img src="/!images/icon_top.png" /></p>
            <div class="uploadimgcon">
                <p class="requiredclose">
                    <img src="/!images/icondel_off.gif" id="img1" onmouseover="MM_swapImage(this.id,'','/!images/icondel_on.gif',31)"
                        onmouseout="MM_swapImgRestore()" /></p>
                <div class="btn_uploadimg">
                    <div class="uploadswf">
                        <input type="file" name="uploadify" id="uploadify" />
                        <asp:HiddenField ID="hfadddate" runat="server" Value="" />
                    </div>
                    <div id="showImage" class="uploadimg_list">
                        <ul>
                            <li>
                                <p class="servicepic">
                                    <img class="unuploaded" id="1" src="/!images/default_pic.jpg" /></p>
                                <p class="delservice">
                                    <img id="del_1" src="/!images/icon_del.jpg" /></p>
                            </li>
                            <li>
                                <p class="servicepic">
                                    <img class="unuploaded" id="2" src="/!images/default_pic.jpg" /></p>
                                <p class="delservice">
                                    <img id="del_2" src="/!images/icon_del.jpg" /></p>
                            </li>
                            <li>
                                <p class="servicepic">
                                    <img class="unuploaded" id="3" src="/!images/default_pic.jpg" /></p>
                                <p class="delservice">
                                    <img id="del_3" src="/!images/icon_del.jpg" /></p>
                            </li>
                        </ul>
                        <asp:HiddenField ID="hfpath" runat="server" />
                    </div>
                    <div id="fileQueue" class="required_info">
                        <p id="imageUploadTip">
                            上传要求，最少一张，最多三张，宽和高都不得小于450，文件大小不能超过2MB！</p>
                    </div>
                </div>
                <p class="btn_publish">
                    <img class="next" title="duration" src="/!images/btn_publish.jpg" /></p>
            </div>
        </div>
        <%-- 上传时间--%>
        <div class="uploadimgbar uploadtimewid addduration  hide">
            <p class="uploadicon">
                <img src="/!images/icon_top.png" /></p>
            <div class="uploadimgcon">
                <p class="uploadcycle">
                    周期</p>
                <p class="requiredclose">
                    <img src="/!images/icondel_off.gif" id="img2" onmouseover="MM_swapImage(this.id,'','/!images/icondel_on.gif',32)"
                        onmouseout="MM_swapImgRestore()" /></p>
                <div class="required_info">
                    <p>
                        完成这项服务所需的时间，单位为“天”！</p>
                </div>
                <div class="publish_s">
                    <asp:DropDownList ID="ddlDuration" runat="server" CssClass="publish_select">
                        <asp:ListItem Value="1" Text="1" />
                        <asp:ListItem Value="2" Text="2" />
                        <asp:ListItem Value="3" Text="3" />
                        <asp:ListItem Value="4" Text="4" />
                        <asp:ListItem Value="5" Text="5" />
                        <asp:ListItem Value="10" Text="10" />
                        <asp:ListItem Value="15" Text="15" />
                        <asp:ListItem Value="20" Text="20" />
                        <asp:ListItem Value="30" Text="30" />
                    </asp:DropDownList>
                </div>
                <p class="uploadcycle">
                    有效期</p>
                <div class="required_info">
                    <p>
                        您的服务将在有效期 后自动挂起！</p>
                </div>
                <div class="publish_s publish_snob">
                    <asp:CheckBox ID="cbForever" Text="永久有效" runat="server" />
                    <asp:TextBox ID="txtEnableDuration" runat="server" class="service_input" />&nbsp;天
                </div>
                <div class="btn_publish">
                    <img class="next" title="video" src="/!images/btn_publish.jpg" /></div>
            </div>
        </div>
        <%-- 上传视频--%>
        <div class="uploadimgbar uploadimgwid addvideo hide">
            <p class="uploadicon">
                <img src="/!images/icon_top.png" /></p>
            <div class="uploadimgcon">
                <p class="requiredclose">
                    <img src="/!images/icondel_off.gif" id="img3" onmouseover="MM_swapImage(this.id,'','/!images/icondel_on.gif',33)"
                        onmouseout="MM_swapImgRestore()" /></p>
                <div class="btn_uploadimg">
                    <div class="uploadswf">
                        <input type="file" name="uploadify" id="videouploadify" />
                        <asp:HiddenField ID="hfvideopath" runat="server" Value="" />
                    </div>
                </div>
                <div id="videoQueue" class="required_info">
                    <p>
                        请选择不大于50M的avi, mov, mpg, mp4, flv文件</p>
                </div>
                <p class="btn_publish">
                    <img class="next" title="stock" src="/!images/btn_publish.jpg" /></p>
            </div>
        </div>
        <!--库存-->
        <div class="uploadimgbar uploadtimewid addstock hide">
            <p class="uploadicon">
                <img src="/!images/icon_top.png" /></p>
            <div class="uploadimgcon">
                <p class="requiredclose">
                    <img src="/!images/icondel_off.gif" id="img6" onmouseover="MM_swapImage(this.id,'','/!images/icondel_on.gif',33)"
                        onmouseout="MM_swapImgRestore()" /></p>
                <p class="upload_keyword bold">
                    <asp:CheckBox ID="cbxNeedStock" Text="是否限量提供？" runat="server" />
                </p>
                <p class="upload_keyword" id="needStock">
                    <span class="bold">库存：</span>
                    <asp:TextBox ID="txtStock" runat="server" CssClass="service_input" MaxLength="3" />
                </p>
                <div class="required_info">
                    <p>
                        如果该服务限量提供，则勾选"是否限量提供"的单选框，并输入库存量！当库存量售完后，该服务将自动挂起。</p>
                </div>
                <p class="btn_publish">
                    <img class="next" title="key" src="/!images/btn_publish.jpg" /></p>
            </div>
        </div>
        <%-- 关键字--%>
        <div class="uploadimgbar uploadtimewid addkey hide">
            <p class="uploadicon">
                <img src="/!images/icon_top.png" /></p>
            <div class="uploadimgcon">
                <p class="requiredclose">
                    <img src="/!images/icondel_off.gif" id="img4" onmouseover="MM_swapImage(this.id,'','/!images/icondel_on.gif',34)"
                        onmouseout="MM_swapImgRestore()" /></p>
                <div class="upload_keyword">
                    <p class="bold">
                        热门关键词:</p>
                    <div class="upload_keywordtxt">
                        <asp:Repeater ID="repHotKey" runat="server">
                            <ItemTemplate>
                                <span><a href="#" class="selectkey">
                                    <%#(string)Container.DataItem%></a></span>
                            </ItemTemplate>
                        </asp:Repeater>
                        <p class="clear">
                        </p>
                    </div>
                    <p class="clear">
                    </p>
                    <div class="upload_keymark">
                        <p>
                            自创：<asp:TextBox ID="txtTags" runat="server" CssClass="serviceinput" MaxLength="100" />
                        </p>
                    </div>
                </div>
                <div class="required_info">
                    <p>
                        关键字之间以逗号分隔，且长度不大于五个汉字！</p>
                </div>
                <p class="btn_publish">
                    <img class="next" title="ship" src="/!images/btn_publish.jpg" /></p>
            </div>
        </div>
        <!--交付方式-->
        <div class="uploadimgbar uploadtimewid addship hide">
            <p class="uploadicon">
                <img src="/!images/icon_top.png" /></p>
            <div class="uploadimgcon">
                <p class="requiredclose">
                    <img src="/!images/icondel_off.gif" id="img5" onmouseover="MM_swapImage(this.id,'','/!images/icondel_on.gif',33)"
                        onmouseout="MM_swapImgRestore()" /></p>
                <div class="delivery">
                    <table>
                        <tr>
                            <td>
                                <asp:RadioButton Text="网络" runat="server" GroupName="delivery" />
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:RadioButton ID="chkNeedShipping" Text="快递" runat="server" GroupName="delivery" />
                            </td>
                            <td>
                                <asp:TextBox ID="txtNativeCharge" runat="server" class="paycost" MaxLength="3" Text="快递费" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:RadioButton Text="其它" runat="server" GroupName="delivery" />
                            </td>
                            <td>
                            </td>
                        </tr>
                    </table>
                    <p class="btn_publish">
                        <img class="next" title="" src="/!images/btn_publish.jpg" /></p>
                </div>
            </div>
        </div>
        <p class="btn_serviceadd">
            <asp:ImageButton ID="ibtnSubmit" runat="server" OnClick="submit_Click" ImageUrl="/!images/btn_saveoff.jpg"
                onmouseover="MM_swapImage('ibtnSubmit','','/!images/btn_saveon.jpg',5)" onmouseout="MM_swapImgRestore()"
                alt="保存" onfocus="MM_swapImage('ibtnSubmit','','/!images/btn_saveon.jpg',5)" /></p>
    </div>
    <script type="text/javascript">
        $(function () {
            $('.addupload').children().each(function () {
                $(this).click(function () {
                    var node = $('.add' + this.id);
                    $('.uploadimgbar:visible').each(function () {
                        if (node.attr('class') != $(this).attr('class')) {
                            $(this).hide();
                        }
                    });

                    $('.add' + this.id).toggle();

                    var offset = $(this).offset();

                    $('.add' + this.id).offset({ left: offset.left - 5, top: offset.top + 27 });

                });
            });

            $('.requiredclose').click(function () {
                $(this).parent().parent().hide();
            });

            //下一步
            $('.next').click(function () {
                var title = this.title;
                if (title != "") {
                    $('#' + title).click();
                }
                else {
                    $(this).parent().parent().parent().parent().hide();
                }
            });

        });
    </script>
</asp:Content>
